# from celery import Celery
from celery_tasks.sms import constants
from celery_tasks.sms.yuntongxun.sms import CCP
from celery_tasks.main import celery_app
# celery_app = Celery('meiduo')
#
# celery_app.config_from_object('celery_tasks.config')
#
# celery_app.autodiscover_tasks(['celery_tasks.sms'])
#

@celery_app.task(name='send_sms_code')
def send_sms_code(mobile, sms_code):

    CCP().send_template_sms(mobile, [sms_code, constants.IMAGE_CODE_EXPIRE_REDIS // 60], 1)